package com.flow.controller;

import com.flow.entity.MyContext;
import com.yomahub.liteflow.annotation.LiteflowRetry;
import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * FlowController
 *
 * @author grl
 * @date 2024/4/17
 */
@Slf4j
@RestController
public class FlowController {

    @Resource
    private FlowExecutor flowExecutor;

    @GetMapping(value = "/flow/start")
    public void testConfig() {
        LiteflowResponse response = flowExecutor.execute2Resp("chain1", 10, MyContext.class);
    }

}
